2 - Lecture 02: Data representation and floats [ID:50404]
50 von 853 angezeigt

everybody. People online, can you hear me? Can you hear me clearly? You can just reply

with an emoji, thumbs up emoji, something like that. Yes. Okay. Perfect. So let's quickly

recap.

Oh no. First things first. Some administrative things. So the thing is you're responsible

to figure out what benefit you get in this course, also in terms of credit. So many of

you are in different kind of curricular and different study programs. And this course

does not count for all of them. Yeah. If you're for example in masters AI, you're very welcome

to listen to that, but I would expect you to be already be able to program highest than

if you do masters AI. Other courses, please check. There are a couple of courses where

this is integrated and you can use otherwise feel free to attend and contribute, but you

can't fully use this in your course. Let's quickly recap what we did last week. Content

wise, this was just very basic Korean algebra. I do remember if only two values true and

false, true and false kind of represented by ones and zeros. And we can build simple equations

like that. You can use operators like not and, and, or it's very intuitive because most

of us think in that way. And then we can start to set up sort of decision, the questions

like, should I take an umbrella today? Well, I only do this if I don't take the car and

only if there's a bad weather forecast or it's already raining outside. Right? So you

can start to make propositions like these and then evaluate them mathematically. So

we can write down an equation like this and replace certain things with variables and

our operators with, with, with shorthand notations like this prime means not usually the multiplication

dot here, the thicker multiplication thought is an end. And in our notation, we use the

or you might've seen different ways to, to show that the pure math would use the we and

the upside down we things like that, but it's the same idea. Right? So the different operators

for different things and they have precedence. All right. So, and not before and before or

the same as, as in math and in programming languages, you'll see differences like this

where you can do either logical and or binary and the only difference is you interpret each

value zero and one and do then a binary and or a logical like, is it defined or not? Or

is it defined as false or true? There are pooling variables you can use like this. Now

the key is really truth tables. Right? So we can write down every possible combination

of these pooling equations as a truth table. Now these three, you should be able to reproduce

without anything. Just think about what's happening. You only need to write down all

of the possibilities on A and B. Either both are zero or just one of them is one or both

are one. This is very, very simple. And then do an end combination. So end really means

what it is only if both are set. We say it's true and the or does more or less the opposite

says if either of those two is set and it's true and do not just invert that, that value

that's there. Now this is reasonably simple. Right? A problem arises when we have more

complicated statements and probably want to simplify them or evaluate them. So we can

do the whole thing as truth table to see what's actually going on if all of the conditions

we have considered are really the way we expect them to behave. Right? So that's a very important

factor because it's your responsibility to do, to make sure that you computed that's

what you expected to do. On a side note, this is a starting point also for hardware development.

We'll not talk about this in this course but you would also start with something like

this to just hardwire things. You can build from a truth table with other techniques directly

transistors, switches, all sorts of things you put in hardware to make this logic work.

You can also build it in Minecraft or if you like with light switches or anything that

is the core of all of the computers you use here in this room. That's really the issue.

Right? So the more variables I have, the more possibilities I have to cover. So for n variables

we have 2 to the power of n possibilities to cover so that truth table grows exponentially.

It's becoming very, very complicated to do this on more complicated Boolean equation

than this. So for this Boolean equation, like the umbrella equation, it's already relatively

Zugänglich über

Offener Zugang

Dauer

01:43:28 Min

Aufnahmedatum

2023-10-30

Hochgeladen am

2023-10-30 13:36:04

Sprache

en-US

0111011110111110111100000011

Tags

Python Programming
Einbetten
Wordpress FAU Plugin
iFrame
Teilen